package com.j.lemon.learn.basic.filter;

import org.springframework.core.annotation.Order;

import javax.servlet.*;
import java.io.IOException;
@Order(2)
public class TestFilter1 implements Filter{
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Testfilter1 doFilter 前");

        filterChain.doFilter(servletRequest,servletResponse);

        System.out.println("Testfilter1 doFilter 后");

    }

    @Override
    public void destroy() {
        System.out.println("test1 has been destroy");
    }
}
